const { getAllCategories } = require("../service/categories");

module.exports = {
  async list(ctx) {
    const categories = await getAllCategories(ctx);

    ctx.body = {
      code: 0,
      message: "获取分类列表成功",
      data: categories,
    };
  },
};
